<?php $this->load->view('scenic/layout/header') ?>
<!-- 电子检票 -->
<header class="scan-head sec-head flex">
    <div class="sec-return">
        <a href="javascript:goHistoryBack('<?php echo site_url('home/ucenter/index'); ?>');">
            <i class="iconfont">&#xe606;</i>
        </a>
    </div>
    <div class="pay-name">订单详情</div>
    <div class="pay-option flex">
        <a href="<?php echo site_url(); ?>">
            <i class="iconfont">&#xe605;</i>
        </a>
        <a href="<?php echo site_url('home/ucenter/index'); ?>">
            <i class="iconfont">&#xe622;</i>
        </a>
    </div>
</header>
<div class="widthMax">
    <!-- <div class="flex order-base">
        <span class="flex-1">订单号：8888888</span>
        <span>下单时间：2016-01-21  12:12</span>
    </div> -->
    <section class="payDetail-text">
        <ul>
            <?php $total = 0; ?>
            <?php foreach($orderList as $order) : ?>
            <?php $total += $order->amount_fee; ?>
            <li>
                <h6 class="am-text-truncate"><?php echo $order->goods_name; ?></h6>
                <div class="payDetail-label">
                    <div class="tion-number">购买份数：￥
                    <i><?php echo $order->price; ?>
                    </i>x<i><?php echo $order->number ? $order->number : $order->goods_num; ?></i>份
                    </div>
                    <div class="tion-state-wrap flex">
                        <div class="flex-1 tion-state">
                            <?php
                                if (((int)$order->bit_pay & 65536) == 65536)
                                {
                                    if ($order->bit_use) {
                                        echo '已检票';
                                    } elseif (((int)$order->bit_opt& 128) == 128) {
                                        echo '退票审核中';
                                    } else {
                                        echo '已付';
                                    }
                                } else {
                                    if (((int)$order->bit_wan & 8) == 8) {
                                        echo '景区到付';
                                    } else {
                                        echo '未支付';
                                    }
                                }
                            ?>
                        </div>
                        <div class="tion-price">
                            订单金额：<i><span>￥</span><?php echo $order->amount_fee; ?></i>
                        </div>
                    </div>
                </div>
            </li>
            <?php endforeach; ?>
        </ul>
        <div class="detail-tion">
            <p class="time">下单时间：<?php echo date('Y-m-d H:i:s', $orderList[0]->ordertime); ?></p>
            <p class="time">出行时间：<?php echo date('Y-m-d', $orderList[0]->plantime); ?></p>
            <p class="total-money">订单总金额：<i><span>￥</span><?php echo $total; ?></i></p>
            <ul class="tion-list">
                <li>
                    <h5>取票人：</h5>
                    <p class="flex-1"><?php echo $orderList[0]->play_name; ?></p>
                </li>
                <li>
                    <h5>身份证：</h5>
                    <p class="flex-1"><?php echo substr_sfz($orderList[0]->sfz); ?></p>
                </li>
                <li>
                    <h5>联系电话：</h5>
                    <p class="flex-1"><?php echo subStrMobilePhone($orderList[0]->phone); ?></p>
                </li>
                <?php if (((int)$orderList[0]->bit_pay & 65536) == 65536) : ?>
                <li class="voucher">
                    <h5>入园凭证：</h5>
                    <div class="order-code">
                        <img src="<?php echo $this->config->show_image_url('scenic-payid-'. $orderList[0]->pay_id.'.png', '', 'qrcode');?>">
                        <p>请向工作人员展示二维码入园</p>
                    </div>
                </li>
                <?php endif; ?>
            </ul>
        </div>
    </section>
</div>

<?php if (((int)$orderList[0]->bit_pay & 65536) != 65536) : ?>
<footer class="detail-foot">
    <a href="<?php echo site_url('scenic/payment/payOrderScenic/'.$orderList[0]->pay_id); ?>">去支付</a>
</footer>
<?php endif; ?>

<?php $this->load->view('scenic/layout/footer'); ?>